//-----------------------------------------------------------------------
// <copyright file="a_FavoriteService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
using System.Collections.Generic;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_FavoriteService
    {
        #region a_Favorite

        public static void Createa_Favorite(a_Favorite a_Favorite)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Createa_Favorite(a_Favorite);
            }
            catch (Exception ex)
            {                
                throw ex;
            }
        }

        public static void Createa_FavoriteBySSID(a_Favorite a_Favorite, string ssid)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Createa_FavoriteBySSID(a_Favorite, ssid);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void Updatea_Favorite(a_Favorite a_Favorite)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Updatea_Favorite(a_Favorite);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Favorite(int id)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Deletea_Favorite(id);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void Deletea_FavoriteImg(int FavId, string ssid, int AlbumId)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Deletea_FavoriteImg(FavId, ssid, AlbumId);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void Deletea_FavoriteArtBySSID(int artId, string ssid)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                a_FavoriteDAO.Deletea_FavoriteArtBySSID(artId, ssid);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        
        public static a_Favorite Geta_Favorite(int id)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_Favorite(id);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }   
        
        public static List<List<int>> Geta_Favorites(string ckid)
        {
             try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_Favorites(ckid);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_FavoriteCollection Geta_FavoriteList(a_FavoriteColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_FavoriteCollection Geta_FavoriteList(a_FavoriteColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static a_FavoriteCollection Geta_FavoriteListByAlbumID(int AlbumID, a_FavoriteColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteListByAlbumID(AlbumID, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_FavoriteCollection Geta_FavoriteListByAlbumID(int AlbumID, a_FavoriteColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteListByAlbumID(AlbumID, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_FavoriteCollection Geta_FavoriteListListCatBySSID(string ssid, a_FavoriteColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteListListCatBySSID(ssid, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_FavoriteCollection Geta_FavoriteListListCatBySSID(string ssid, a_FavoriteColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_FavoriteDAO a_FavoriteDAO = new a_FavoriteDAO();
                return a_FavoriteDAO.Geta_FavoriteListListCatBySSID(ssid, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        #endregion
    }
}